<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>考勤管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        };
      /*   function onChange(){
        	var schoolId='${schoolId}';
        	var classesId=$("#classesId").val();
        	if(classesId==""|classesId==null){
        		$("#schoolId").val(schoolId);
        	} 
        }; */
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/dd/ddRecord/">记录列表</a></li>
		<%-- <shiro:hasPermission name="dd:ddRecord:edit"><li><a href="${ctx}/dd/ddRecord/form">单表添加</a></li></shiro:hasPermission> --%>
	</ul>
	<form:form id="searchForm" modelAttribute="ddRecord" action="${ctx}/dd/ddRecord/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			 <li><label>姓名：</label> <form:input path="studentName"
					htmlEscape="false" maxlength="50" class="input-medium" /></li>
			<li><label>卡号：</label> <form:input path="cardNumber"
					htmlEscape="false" maxlength="50" class="input-medium" /></li>
			<li><label>班级：</label> 
				<form:select path="classesId"  id="classesId"  class="input-small form-control required ">
					<form:option value="">全校</form:option>		
					<c:forEach items="${fns:getClassesListBySchoolId(schoolId)}" var="classes">
						<form:option value="${classes.id}">${fns:getDictLabel(classes.grade, "grade", "")}${classes.classes}班</form:option>
					</c:forEach>					
				</form:select> 
				<%-- <form:input path="schoolId" id="schoolId" type="hidden"/>  --%>
			</li>
			<li><label>到离：</label> 
				<form:select path="flag" class="input-mini form-control required ">		
						<%-- <form:option value="">全部</form:option> --%>
						<form:option value="0">到校</form:option>
						<form:option value="1">离校</form:option>
				</form:select> 
			</li>		
			<li class="btns"><input id="btnSubmit" class="btn btn-primary"
				type="submit" value="查询" />
				<!-- <input id="btnImport" class="btn btn-primary" type="button" value="导入"/> -->
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>姓名</th>
                <th>卡号</th>
				<th>记录时间</th>
				<th>备注</th>
			<%-- 	<shiro:hasPermission name="dd:ddRecord:edit"><th>操作</th></shiro:hasPermission> --%>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="ddRecord">
			<tr>
				<td> ${ddRecord.studentName}</td>
                <td> ${ddRecord.cardNumber}</td>
                <td>
				<fmt:formatDate value="${ddRecord.recordTime}" pattern="yyyy-MM-dd hh:mm:ss"/>
				</td>
				<td> ${ddRecord.description}${fns:getClassRoomName(ddRecord.classRoomId)}</td>
				<%-- <shiro:hasPermission name="dd:ddRecord:edit"><td>
    				<a href="${ctx}/dd/ddRecord/form?id=${ddRecord.id}">修改</a>
					<a href="${ctx}/dd/ddRecord/delete?id=${ddRecord.id}" onclick="return confirmx('确认要删除该单表吗？', this.href)">删除</a>
				</td></shiro:hasPermission> --%>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>